﻿<?php include("conn.php");
 mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $name;
	public $city;
	public $cityid;
	function __construct($name,$city,$cityid)
	{
		$this->name      = $name;
		$this->city      = $city;
		$this->cityid      = $cityid;
		
	}
}


 
	$rert30=mysql_query("select *from city ");
	
	$prize = array();
	
	while($rowf=mysql_fetch_array($rert30)){
	 
		$prize[] = new MyPrizeBean($rowf['name'],$rowf['city'],$rowf['id']);
				
	}

	$result = array();
	$result['code'] = 200;
	$result['msg'] = '获取成功';
	$result['data'] = $prize;
	

echo json_encode($result);


?>